<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #container{
            display: flex;
        }
        #left{
            border: 1px solid #000;
            width: 200px;
            height: 200px;
        }
        #right{
            border: 1px solid #000;
            width: 300px;
            height: 300px;
        }
    </style>
</head>
<body>
    <div id="container">
        <div id="left">
            dddddd
        </div>
        <div id="right">
            <label for="">属性名:<input type="text" id="att"></label><br>
            <label for="">属性值:<input type="text" id="val"></label><br>
            <button type="button">执行</button>
        </div>
    </div>




    <script>
        var btn = document.querySelector('button');
        var left = document.querySelector('#left');
        var att = document.querySelector('#att');
        var val = document.querySelector('#val');
        btn.onclick = function(){
            left.style[att.value] = val.value;
        }
    </script>
</body>
</html>